/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.site.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 外部链接管理Entity
 * @author ben
 * @version 2018-05-01
 */
@Table(name="${_prefix}site_friendlink", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="link_text", attrName="linkText", label="显示文字"),
		@Column(name="link_image", attrName="linkImage", label="链接图片"),
		@Column(name="link_url", attrName="linkUrl", label="链接地址"),
		@Column(name="link_type", attrName="linkType", label="链接类型"),
		@Column(name="createtime", attrName="createtime", label="创建时间"),
		@Column(name="pos", attrName="pos", label="显示位置"),
		@Column(name="sort", attrName="sort", label="排序"),
	}, orderBy="a.id DESC"
)
public class SiteFriendlink extends DataEntity<SiteFriendlink> {
	
	private static final long serialVersionUID = 1L;
	private String linkText;		// 显示文字
	private String linkImage;		// 链接图片
	private String linkUrl;		// 链接地址
	private Integer linkType;		// 链接类型
	private Date createtime;		// 创建时间
	private Integer pos;		// 显示位置
	private Long sort;		// 排序
	
	public SiteFriendlink() {
		this(null);
	}

	public SiteFriendlink(String id){
		super(id);
	}
	
	@Length(min=0, max=100, message="显示文字长度不能超过 100 个字符")
	public String getLinkText() {
		return linkText;
	}

	public void setLinkText(String linkText) {
		this.linkText = linkText;
	}
	
	@Length(min=0, max=100, message="链接图片长度不能超过 100 个字符")
	public String getLinkImage() {
		return linkImage;
	}

	public void setLinkImage(String linkImage) {
		this.linkImage = linkImage;
	}
	
	@Length(min=0, max=100, message="链接地址长度不能超过 100 个字符")
	public String getLinkUrl() {
		return linkUrl;
	}

	public void setLinkUrl(String linkUrl) {
		this.linkUrl = linkUrl;
	}
	
	public Integer getLinkType() {
		return linkType;
	}

	public void setLinkType(Integer linkType) {
		this.linkType = linkType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
	
	public Integer getPos() {
		return pos;
	}

	public void setPos(Integer pos) {
		this.pos = pos;
	}
	
	public Long getSort() {
		return sort;
	}

	public void setSort(Long sort) {
		this.sort = sort;
	}
	
}